this.screenshotPreview = function(){	
	xOffset = 10;
	yOffset = 30;
	$("#followers").hover(function(){
		clearTimeout(this.timeout);
		},function(){
		 this.timeout = setTimeout(function() { 
			$("#screenshot")
				.attr('title',$("#screenshot").t)
				.remove(); 
			}, 1000);
	})
	.each(function(i){
         this.timeout = '';
    }).show('slow');

	$("a.screenshot")
	  .click(function(){
			return false;
		})
	  .hover(function(e){
		this.t = this.title;
		this.title = '' ;
			$("body").append("<div id='screenshot'>"+$(this.rel).html()+"</div>");								 
			$("#screenshot")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px")
				.fadeIn("fast");						
         },
	    function(){
		this.title = this.t;
		$("#screenshot").remove();
      })
	.mousemove(function(e){
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


function launchComment(id) {
	cWin = window.open("http://blog.pcsilva.com/addcomment.cfm?id="+id,"cWin","width=550,height=700,menubar=yes,personalbar=no,dependent=true,directories=no,status=yes,toolbar=no,scrollbars=yes,resizable=yes");
}
function launchCommentSub(id) {
	cWin = window.open("http://blog.pcsilva.com/addsub.cfm?id="+id,"cWin","width=550,height=350,menubar=yes,personalbar=no,dependent=true,directories=no,status=yes,toolbar=no,scrollbars=yes,resizable=yes");
}
function launchTrackback(id) {
	cWin = window.open("http://blog.pcsilva.com/trackbacks.cfm?id="+id,"cWin","width=550,height=500,menubar=yes,personalbar=no,dependent=true,directories=no,status=yes,toolbar=no,scrollbars=yes,resizable=yes");
}
function checklocal(){
	//if(top != self){  top.location.replace(self.location.href); }
}
var contwindow = 0 ;
$(function(){
		$('a.external').click(function(){
			var win = window.open($(this).attr('href'),'win'+(contwindow+1));
			return false;
		});

		$('input.searchchoise').click(function(){
			var elems = $(document).find('input.searchchoise');
			var old   = elems[1];
			if($(old).val() == $(this).val()) old = elems[0];
			$('#'+$(old).val()).hide();
			$('#'+$(this).val()).show();
		});
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		$.include(gaJsHost + 'google-analytics.com/ga.js',function(){
			try {
			var pageTracker = _gat._getTracker("UA-7591613-1");
			pageTracker._trackPageview();
			} catch(err) {}		
		}); 
		checklocal();
		$($('#menumeio').find('div.rightMenu')[3]).css('display','table');
		$('#menumeio a').css('font-size','0.85em');
		screenshotPreview();
});